ENH:Add 3D PDF calculator support#49
Conversation
Need this for develop mode building
docs: add development instructions for compiling source code
sbillinge
left a comment
There was a problem hiding this comment.
I didn't see any tests. Are there tests?
Can we also try and think about if it makes sense to make shared functions for anything to avoid copy-paying code from the PDF calculator? The more we can separate into shared functions the less duplication we have to maintain in the future
| * | ||
| * libdiffpy by DANSE Diffraction group | ||
| * Simon J. L. Billinge | ||
| * (c) 2009 The Trustees of Columbia University |
There was a problem hiding this comment.
Please fix date and address. I am not sure we actually need this text block any more as we do the copyright and attribution differently do maybe just delete the whole block?
|
Thanks Simon. I updated the PR to address these review comments. I removed the copied legacy copyright/header blocks from the new I also refactored the shared structure-factor and normalization logic so The 3D grid deposition, spherical q-window, and delta-shell preprocessing remain I verified the updated libdiffpy build locally with scons -j2. |
|
This is great. Thanks. Please can you paste the results of running tests locally? Also, possibly on a new branch, please could you try and merge |
Hi @sbillinge @dragonyanglong ,
This PR adds a CPU PDF3DCalculator implementation to libdiffpy. The calculator
produces 3D real-space PDF data on a cubic grid, exposes radial histogram data,
supports binary dense-grid export, q-window post-processing, rho0 background
scaling, and 3D covariance delta controls.
It also includes the small supporting changes needed by the calculator:
a symmetric 3x3 eigen-solver helper in R3linalg, a PDFCalculator helper for
partial PDF scale, and an ObjCryst translation-vector type compatibility fix
for builds where ObjCryst::REAL is double.
I tested the libdiffpy build locally with ObjCryst/GSL/Boost available.